
import "./css/index.css";
import app from "./in.vue"
import vue from "vue";
import MinUi from "mint-ui"//导入minui
import "mint-ui/lib/style.css"//导入样式


//import './fonts/mui.ttf'
import '../lib/css/icons-extra.css'
import vueRouter from "vue-router";
import '../lib/js/webviewGroup.js'
import '../lib/js/imgls.js'
import '../lib/css/mui.min.css'
import mui from "../lib/js/mui.min.js"
// 第一种方法 预览图
//import '../lib/js/mui.zoom.js'
//import '../lib/js/mui.previewimage.js'

// 第二种方法 
import vuePreview from "vue-preview"
vue.use(vuePreview);
vue.prototype.mui=mui;
vue.use(MinUi);


vue.use( vueRouter);
import home from "./component/home.vue"
import member from "./component/member.vue"
import setUp from "./component/setUp.vue"
import cart from "./component/cart.vue"
import news from "./component/news/newsList.vue"
import newscoment from "./component/news/list/newsComent.vue"
import imgls from "./component/imglist/imglist.vue"
import imgdetails from "./component/imglist/imgdetails.vue"
import shop from "./component/Shop/mobileshop.vue"
import shopDetails from "./component/Shop/shopdetails.vue"
import shopComment from "./component/Shop/shopcomment.vue"
import duce from "./component/Shop/introduce.vue"


import axios from "axios"
import vaxios from "vue-axios"

import moment from "moment"

import store from './store.js'


//定义一个全局过滤器 用于 过滤时间格式
vue.filter("timeformat",function(value){
    return moment(value).format("YYYY-MM-DD HH:mm:ss");
})


vue.use(vaxios,axios);
//设置一些请求头部
vue.axios.defaults.baseURL="http://api.cms.liulongbin.top/";
vue.axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
var router=new vueRouter({
    routes:[
        {
            path:"/",
            redirect:"/home"
        },
        {
            path:'/home',
            component:home
        },
        {
            path:'/member',
            component:member
        },
        {
            path:'/cart',
            component:cart
        },
        {
            path:'/setUp',
            component:setUp
        },
        {
            path:'/home/news',
            component:news
        },
        {
            //路由传参
            path:'/home/news/newsComent/:id',
            props:true,
            component:newscoment
        },
        {
            path:'/home/imgls',
            component:imgls
        },
        {
            path:'/home/imgdetails/:id',
            props:true,
            component:imgdetails
        },
        {
            path:'/home/shop',
            component:shop
        },
        {
            path:'/home/shopdetails/:id',
            props:true,
            component:shopDetails
        },
        {
            path:'/home/shopcomment/:id',
            props:true,
            component:shopComment
        },
        {
            path:'/home/duce/:id',
            props:true,
            component:duce
        },
        
    ],
    linkActiveClass:"mui-active"
})
var vm=new vue({
    el:"#app",
    render:function(c){
        return c(app);
    },
    created() {
    
    }, 
    router,
    store
});